package cn.cdeden.resource.domain.bo;

import cn.cdeden.common.core.validate.AddGroup;
import cn.cdeden.common.core.validate.EditGroup;
import cn.cdeden.resource.domain.SysOssRecentlyViewed;
import cn.cdeden.common.mybatis.core.domain.BaseEntity;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.*;
import jakarta.validation.constraints.*;

import java.util.Date;

/**
 * 文件最近查看业务对象 sys_oss_recently_viewed
 *
 * @author Yu.
 * @date 2024-12-09
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SysOssRecentlyViewed.class, reverseConvertGenerate = false)
public class SysOssRecentlyViewedBo extends BaseEntity {

    /**
     *
     */
    @NotNull(message = "不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 文件编号
     */
    @NotNull(message = "文件编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long ossId;

    /**
     * 模块编号
     */
    @NotBlank(message = "模块编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String moduleId;

    /**
     * 文件版本名称
     */
    @NotBlank(message = "文件版本名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String versionId;

    /**
     * 文件版本
     */
    @NotBlank(message = "文件版本不能为空", groups = { AddGroup.class, EditGroup.class })
    private String versionName;

    /**
     * 文件类型
     */
    @NotBlank(message = "文件类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String moduleType;

    /**
     * 最近查看时间
     */
    @NotNull(message = "最近查看时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date viewedTime;

    /**
     * 查看的次数
     */
    @NotNull(message = "查看的次数不能为空", groups = { AddGroup.class, EditGroup.class, })
    private Long viewedNum;


    /**
     * 创建者
     */
    private Long createBy;


}
